package com.reflect;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86184
 * Date: 2023-12-12
 * Time: 9:25
 */
public class Test2 {
    public static void main(String[] args) throws ClassNotFoundException {
        //对象.getClass();
        Teacher teacher = new Teacher();
        Class c1 = teacher.getClass();
        System.out.println(c1);

        //类.class
        Class c2 = Teacher.class;
        System.out.println(c2);

        //Class.forName(String str);
        Class c3 = Class.forName("com.reflect.Teacher");
        System.out.println(c3);
    }
}
